# Uncomment this line to define a global platform for your project
platform :ios, '14.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
  'Debug' => :debug,
  'Profile' => :release,
  'Release' => :release,
}

def flutter_root
  generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
  unless File.exist?(generated_xcode_build_settings_path)
    raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
  end
  
  File.foreach(generated_xcode_build_settings_path) do |line|
    matches = line.match(/FLUTTER_ROOT\=(.*)/)
    return matches[1].strip if matches
  end
  raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

def thirdParty
  pod 'Alamofire'
  pod 'Moya'
#  pod 'RealmSwift'             #本地缓存
#  pod 'AMap3DMap'
#  pod 'AMapSearch'
#  pod 'AMapLocation'
  pod 'MJExtension', '~> 3.4.1'
  pod 'BGFMDB', '~> 2.0.13'
  pod 'SwiftyJSON'
  pod 'HandyJSON',  :git => 'https://github.com/Miles-Matheson/HandyJSON.git'
  pod 'IQKeyboardManagerSwift'      #键盘管理
  pod 'EmptyDataSet-Swift', '~> 5.0.0' #空白页
  pod 'JXSegmentedView'             #分段选择
  pod 'Reusable'                    #复用
  pod 'SVProgressHUD', '~> 2.2.5'   #提示框
  pod 'SnapKit'                     #页面布局
  pod 'MJRefresh'                   #刷新
  pod 'Kingfisher'      #图片缓存框架
  pod 'QMUIKit', '~> 4.3.0'         #UI框架
  pod 'JKSwiftExtension'            #开发工具箱
  pod 'LLCycleScrollView'           #bannar
  pod 'SwiftyBluetooth', '~> 3.0.0'           #蓝牙框架
  pod 'lottie-ios'             #动画加载
  pod 'KeenCodeUnit'           #验证码框
  pod 'KeychainAccess'         #钥匙串
  pod 'iOSDFULibrary' , '~> 4.11.1'         #固件升级
  pod 'BRPickerView'           #选择器
  pod 'AAInfographics', :git => 'https://github.com/AAChartModel/AAChartKit-Swift.git'
  pod 'ZLPhotoBrowser'           #图片选择
  pod 'AFNetworking', '~> 4.0'   #网络请求
  pod 'FSCalendar'               # 日历
  pod 'SwiftDate', '~> 5.0'      #日期处理
  pod 'SwiftyFitsize','~> 1.4.1' #屏幕适应
  pod 'ZFPlayer'                 #视频播放器
  pod 'ZFPlayer/ControlView','~> 4.0'
  pod 'ZFPlayer/AVPlayer', '~> 4.0'
  pod 'UBottomSheet'
  pod 'Presentr'
  pod 'SVGKit'
  pod 'SDWebImage'
  $local = '../../../../CCKit/TCCKit/'
  pod 'TCCKit', :path => '../../../../CCKit/TCCKit/TCCKit'
end
target 'Runner' do
  use_frameworks!
  use_modular_headers!
  
  thirdParty
  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
  target 'RunnerTests' do
    inherit! :search_paths
  end
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
  end
end
